<?php
/**
 * [YIZHIKEJI System] Copyright (c) 2014 yz929.cn
 * YIZHIKEJI is NOT a free software, it under the license terms, visited http://www.yz929.cn/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
//权限检查，不需要检查
//if ($action != 'cash') {
//	checkauth();
//}


load()->model('activity');
$filter = array();
$coupons = activity_coupon_owned($_W['uid'], $filter);
$tokens = activity_token_owned($_W['uid'], $filter);
//$coupons = activity_coupon_owned($_W['member']['uid'], $filter);
//$tokens = activity_token_owned($_W['member']['uid'], $filter);

$setting = uni_setting($_W['uid'], array('creditnames', 'creditbehaviors', 'uc', 'payment', 'passport'));
$behavior = $setting['creditbehaviors'];
$creditnames = $setting['creditnames'];
$credits = mc_credit_fetch($_W['uid'], '*');
//$credits = mc_credit_fetch($_W['member']['uid'], '*');


$sql = 'SELECT `status` FROM ' . tablename('mc_card') . " WHERE `uid` = :uid";
$cardstatus = pdo_fetch($sql, array(':uid' => $_W['uid']));

$ucpage = pdo_fetch("SELECT * FROM ".tablename('site_page')." WHERE uid = :uid ", array(':uid' => $_W['uid']));
if (!empty($ucpage['params'])) {
	$ucpage['params'] = json_decode($ucpage['params'], true);
}

$title = $ucpage['title'];
